package day03;

public class Person {

    private String name;
    private double height;
    private double weight;


    public Person(String name, double height, double weight) {
        this.name = name;
        this.height = height;
        this.weight = weight;
    }

    public void sayHello() {
        System.out.println("hello, my name is " + name);
    }

    // 可以添加getter和setter方法以访问和修改属性
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }
}


